﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.ComponentModel;
using System.Collections.Generic;
using System.Windows.Data;
using System.IO;
using System.Linq;

using Cinch;


namespace Anata.Client
{
    /// <summary>
    /// </summary>
    public class PromoThumbnailViewModel : ViewModelBase
    {
        #region Data

        //private ViewMode currentViewMode = ViewMode.AddMode;

        #region Data.Primitives
        private Int32 idPromo;
        private Int32? idLayanan;
        private Int32? idCabang;
        private String nama;
        private Boolean isPersentase;
        private Double persentasePromo;
        private Int32 nominalPromo;
        private String syarat;
        private Boolean isOnce;
        private Boolean isDaily;
        private Boolean isWeekly;
        private Boolean isMonthly;
        private Boolean isYearly;
        private DateTime? waktuMulai;
        private DateTime? waktuSelesai;
        #endregion

        //private IEnumerable<DataWrapperBase> cachedListOfDataWrappers;

        #region Data.Rules
        #endregion

        #region Data.VMs
        #endregion

        #region Data.Services
        #endregion

        #endregion

        #region Constructor
        public PromoThumbnailViewModel()
        {
            #region Constructor.SetupServices
            #endregion

            #region Constructor.SetupCommands
            #endregion

            #region Constructor.SetupDataWrappers
            #endregion

            //fetch list of all DataWrappers, so they can be used again later without the
            //need for reflection
            //cachedListOfDataWrappers =
            //    DataWrapperHelper.GetWrapperProperties<PromoThumbnailViewModelThumbnailViewModel>(this);

            #region Constructor.SetupValidationRules
            #endregion

            #region Constructor.SetupVMs
            #endregion

        }
        #endregion

        #region Static
        #endregion

        #region Public Properties
        #region Public.Commands
        #endregion

        #region Public.ViewMode
        #endregion

        #region Public.Data
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs idPromoChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IdPromo);
        public Int32 IdPromo
        {
            get { return idPromo; }
            set
            {
                idPromo = value;
                NotifyPropertyChanged(idPromoChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs idLayananChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IdLayanan);
        public Int32? IdLayanan
        {
            get { return idLayanan; }
            set
            {
                idLayanan = value;
                NotifyPropertyChanged(idLayananChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs idCabangChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IdCabang);
        public Int32? IdCabang
        {
            get { return idCabang; }
            set
            {
                idCabang = value;
                NotifyPropertyChanged(idCabangChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs namaChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.Nama);
        public String Nama
        {
            get { return nama; }
            set
            {
                nama = value;
                NotifyPropertyChanged(namaChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs isPersentaseChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IsPersentase);
        public Boolean IsPersentase
        {
            get { return isPersentase; }
            set
            {
                isPersentase = value;
                NotifyPropertyChanged(isPersentaseChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs persentasePromoChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.PersentasePromo);
        public Double PersentasePromo
        {
            get { return persentasePromo; }
            set
            {
                persentasePromo = value;
                NotifyPropertyChanged(persentasePromoChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs nominalPromoChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.NominalPromo);
        public Int32 NominalPromo
        {
            get { return nominalPromo; }
            set
            {
                nominalPromo = value;
                NotifyPropertyChanged(nominalPromoChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs syaratChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.Syarat);
        public String Syarat
        {
            get { return syarat; }
            set
            {
                syarat = value;
                NotifyPropertyChanged(syaratChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs isOnceChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IsOnce);
        public Boolean IsOnce
        {
            get { return isOnce; }
            set
            {
                isOnce = value;
                NotifyPropertyChanged(isOnceChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs isDailyChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IsDaily);
        public Boolean IsDaily
        {
            get { return isDaily; }
            set
            {
                isDaily = value;
                NotifyPropertyChanged(isDailyChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs isWeeklyChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IsWeekly);
        public Boolean IsWeekly
        {
            get { return isWeekly; }
            set
            {
                isWeekly = value;
                NotifyPropertyChanged(isWeeklyChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs isMonthlyChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IsMonthly);
        public Boolean IsMonthly
        {
            get { return isMonthly; }
            set
            {
                isMonthly = value;
                NotifyPropertyChanged(isMonthlyChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs isYearlyChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.IsYearly);
        public Boolean IsYearly
        {
            get { return isYearly; }
            set
            {
                isYearly = value;
                NotifyPropertyChanged(isYearlyChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs waktuMulaiChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.WaktuMulai);
        public DateTime? WaktuMulai
        {
            get { return waktuMulai; }
            set
            {
                waktuMulai = value;
                NotifyPropertyChanged(waktuMulaiChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs waktuSelesaiChangeArgs =
            ObservableHelper.CreateArgs<PromoThumbnailViewModel>(x => x.WaktuSelesai);
        public DateTime? WaktuSelesai
        {
            get { return waktuSelesai; }
            set
            {
                waktuSelesai = value;
                NotifyPropertyChanged(waktuSelesaiChangeArgs);
            }
        }
        #endregion

        #region Public.Cached Collection
        #endregion

        #region Public.DataVM
        #endregion

        #region Public.SummaryData
        #endregion

        #endregion

        #region Command Handlers
        #endregion

        #region Mediator Message Sinks
        #endregion

        #region Private Methods
        #endregion

        #region Overrides
        public override string ToString()
        {
            return String.Format("PromoThumbnailViewModelThumbnailViewModel {0}", this.idPromo);
        }
        #endregion

        #region EditableValidatingViewModelBase overrides
        #endregion
    }
}
